package com.atguigu.lease.common.context;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;

import java.util.Map;

@Component
public class LoginUserContex implements HandlerInterceptor {
    static  final ThreadLocal<Map<String,String>> user = new ThreadLocal<>();

    public static void setUser(Map<String,String> user){
        LoginUserContex.user.set(user);

    }
    public static Map<String, String> getUser(){

        return user.get();
    }
}
